﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyData.DB
{
    public class Init : CreateDatabaseIfNotExists<MyDBContext>
    {
        protected override void Seed(MyDBContext context)
        {
            context.SystemConfigs.Add(new Models.SystemConfig()
            {
                Id = Guid.Empty,
                StartTime = "7:00 AM",
                EndTime = "6:00 PM",
               // Company = "江苏太白集团有限公司",
            });
            context.AdminUsers.Add(new Models.AdminUser()
            {
                Id = Guid.NewGuid(),
                UserName = "admin",
                PassWord = "123456",
                NickName = "系统管理员",
                Menus=""
            });
            context.Departs.Add(new Models.Depart() {
                Id=Guid.Empty,
                Name="访客部",
                Remark="专为访客设计,请误删"
            });
          
            context.Meets.Add(new Models.Meet()
            {
                Id = Guid.NewGuid(),
                MeetName = "新坝镇第四届人民代表大会第四次会议"
            });
            context.SaveChanges();
        }
    }
}
